<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <base href="/"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link rel="stylesheet" type="text/css" href="/webjars/bootstrap/css/bootstrap.min.css"/>
    <title>Session Handling - Spring Security</title>
</head>
<body>
<div class="container" id="main">
    <div class="row" id="welcome">
        <div class="col-12">
            <h1>Session Handling - Spring Security</h1>

            <p>Your current session is <strong th:text="${#httpServletRequest.session.id}"></strong>.</p>
        </div>
    </div>

    <div class="row" id="links">
        <div class="col-12">
            <h2>Links</h2>

            <p>You can log in as <a th:href="@{user/user}">user</a> or as <a th:href="@{admin/admin}">admin</a>.
                Valid users are <strong>user/user</strong> and <strong>admin/admin</strong>.</p>
        </div>
    </div>

    <div class="row" id="logout" th:if="${#httpServletRequest.remoteUser}">
        <div class="col-12">
            <a th:href="@{/logout}">Logout</a>
        </div>
    </div>
</div>
</body>
</html>
